var express = require('express');           //把express文件赋给express对象
var imysql = require('../bin/testdb.js');   //把testdb路径赋给imysql对象
var router = express.Router();

router.get('/1', function(req, res, next) {
    var id = req.query.id;
    imysql.select("SELECT * from user where id = " + id.toString(),res)
});

router.get('/11', function(req, res, next) {
    var id = req.query.id;
    imysql.select("SELECT * from user where id = " + id.toString(),res)
});


router.get('/', function(req, res, next) {
  res.render('index', { title: 'aaaaa' }, { aaa: 'aaaaa' });
});

module.exports = router;
